package yedean.bean;

import com.yedean.factory.BeansException;
import com.yedean.factory.ConfigurableListableBeanFactory;
import com.yedean.factory.config.BeanDefinition;
import com.yedean.factory.config.BeanFactoryPostProcessor;
import com.yedean.factory.property.PropertyValue;

public class MyBeanFactoryPostProcessor implements BeanFactoryPostProcessor {
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory factory) throws BeansException {
        BeanDefinition userService = factory.getBeanDefinition("userService");
        userService.getPropertyValues().addPropertyValue(new PropertyValue("company","杭州时划"));
    }
}
